home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 353_02 / box.cpp < prev    next >
C/C++ Source or Header  |  1992-01-18  |  499b  |  32 lines

  1.                                  // Chapter 5 - Program 8
  2. #include "box.h"
  3.  
  4.  
  5. box::box(void)        //Constructor implementation
  6. {
  7.    length = 8;
  8.    width = 8;
  9. }
  10.  
  11.  
  12. // This method will set a box size to the two input parameters
  13. void box::set(int new_length, int new_width)
  14. {
  15.    length = new_length;
  16.    width = new_width;
  17. }
  18.  
  19.  
  20. box::~box(void)       //Destructor
  21. {
  22.    length = 0;
  23.    width = 0;
  24. }
  25.  
  26.  
  27.  
  28.  
  29. // Result of execution
  30. //
  31. // This implementation file cannot be executed
  32.